<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: new_value.php 11 2013-09-21 11:43:11Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 11 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2013-09-21 11:43:11 +0000 (Sat, 21 Sep 2013) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

echo draw_form('new_value', 'categories.php', '', 'post', 'id="value_form"');
?>
	<table width="100%" cellpadding="6">
		<?php
			$languages = get_languages(); 
			for ($i = 0, $n = sizeof($languages); $i < $n; $i ++) { ?>
			<tr>
				<td colspan="2">
					<?php echo image('../lang/'.$languages[$i]['directory'].'/'.$languages[$i]['image'], $languages[$i]['name']).' <b>'.$languages[$i]['name'] ?></b>
				</td>
			</tr>
			<tr>
				<td width="15%">
					Option:
				</td>
				<td width="55%">
					<select name="option_id">
						<?php $options = $db->db_query("SELECT
															products_options_id,
															products_options_name
														FROM
															".TABLE_PRODUCTS_OPTIONS."
														WHERE
															language_id = '".$languages[$i]['id']."'
														ORDER BY
															products_options_name");
						while (!$options->EOF) {
							echo '<option name="'.$options->fields['products_options_name'].'" value="'.$options->fields['products_options_id'].'">'.$options->fields['products_options_name'].'</option>';
							$options->MoveNext();
						}
						?>
					</select>
				</td>
			</tr>
			<tr>
				<td>
					Optionswert:
				</td>
				<td>
					<?php echo draw_input_field('value_name['.$languages[$i]['id'].']'); ?>
				</td>
			</tr>
			<tr>
				<td>
					Farbcode:
				</td>
				<td>
					<?php echo draw_input_field('hex_image['.$languages[$i]['id'].']'); ?> <em style="font-size:85%">Hex-Code, z.B.: #68AB16</em> 
				</td>
			</tr>
			<tr>
				<td valign="top">
					Beschreibung:
				</td>
				<td>
					<?php echo '<textarea name="value_desc['.$languages[$i]['id'].']" cols="50" rows="4" style="width:95%"></textarea>'; ?>
				</td>
			</tr>
			<tr><td colspan="2" style="border-bottom: 1px dotted #ccc">&nbsp;</td></tr>
		<?php } ?>
		<tr>
			<td></td>
			<td>
				<button type="button" class="button" onclick="xajax_saveNewValue(xajax.getFormValues('value_form'))"><?php echo BUTTON_SAVE ?></button>
			</td>
		</tr>
	</table>
</form>